<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <script type="text/javascript" src='js/jquery-1.12.4.js'></script>
    <script type="text/javascript">
        $(function () {
            var $div = $('.box');
            $div.addClass('big');
            $div.removeClass('red');
        })
    </script> 
    <style type="text/css">
        .box {
            width: 100px;
            height: 100px;
            background-color: gold;
        }

        .big {
            font-size: 30px;
        }

        .red {
            color: red;
        }
    </style>
    <title>Document</title>
</head>

<body>
    <div class="box red">DIV元素</div>

</body>

</html>